import request from '@/config/axios'

// 项目需求评估表单 VO
export interface RequireEvaluationVO {
  id: number // 自增主键
  requirementId: string // 关联需求编号
  evaluationInitiationTime: Date // 需求评估发起时间
  evaluator: string // 评估发起用户
  evaluationFeedback: string // 评估反馈信息
  evaluationResult: string // 评估结果
  evaluationTime: Date // 评估完成时间
}

// 项目需求评估表单 API
export const RequireEvaluationApi = {
  // 查询项目需求评估表单分页
  getRequireEvaluationPage: async (params: any) => {
    return await request.get({ url: `/project/require-evaluation/page`, params })
  },

  // 查询项目需求评估表单详情
  getRequireEvaluation: async (id: number) => {
    return await request.get({ url: `/project/require-evaluation/get?id=` + id })
  },

  // 新增项目需求评估表单
  createRequireEvaluation: async (data: RequireEvaluationVO) => {
    return await request.post({ url: `/project/require-evaluation/create`, data })
  },

  // 修改项目需求评估表单
  updateRequireEvaluation: async (data: RequireEvaluationVO) => {
    return await request.put({ url: `/project/require-evaluation/update`, data })
  },

  // 删除项目需求评估表单
  deleteRequireEvaluation: async (id: number) => {
    return await request.delete({ url: `/project/require-evaluation/delete?id=` + id })
  },

  // 导出项目需求评估表单 Excel
  exportRequireEvaluation: async (params) => {
    return await request.download({ url: `/project/require-evaluation/export-excel`, params })
  },
}